package com.yuhanginfo.modules.web.entity;

import java.math.BigDecimal;
import java.util.Date;

import org.hibernate.validator.constraints.Length;

import com.yuhanginfo.common.persistence.WebDataEntity;

/**
 * 交易历史Entity
 * @author lvls
 * @version 2017-09-21
 */
public class WebTransactionHistory extends WebDataEntity<WebTransactionHistory> {
	
	private static final long serialVersionUID = 1L;
	private String userId;		// 用户id
	private String type;		// 交易类型  0所有、1订单支付、2还款、3还款补录、4退换货、5退运费、6补运费、7其他
	private String code;		// 交易编号
	private BigDecimal money;		// 金额
	private Integer payType;	//支付方式 0额度支付 1现金支付
	private String ordersCode;
	private String num;
	private Date startTime;
	private Date endTime;
	private String typeName;
	
	//
	private String ordersMoney;
	
	public WebTransactionHistory() {
		super();
	}

	public WebTransactionHistory(String id){
		super(id);
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	@Length(min=0, max=11, message="交易类型长度必须介于 0 和 11 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Length(min=0, max=50, message="交易编号长度必须介于 0 和 50 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	public BigDecimal getMoney() {
		return money;
	}

	public void setMoney(BigDecimal money) {
		this.money = money;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getOrdersCode() {
		return ordersCode;
	}

	public void setOrdersCode(String ordersCode) {
		this.ordersCode = ordersCode;
	}

	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}

	public String getOrdersMoney() {
		return ordersMoney;
	}

	public void setOrdersMoney(String ordersMoney) {
		this.ordersMoney = ordersMoney;
	}

	public Integer getPayType() {
		return payType;
	}

	public void setPayType(Integer payType) {
		this.payType = payType;
	}
	
}